package com.star.service;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
/**
 * 生成10000组号码
 * 项目名称：starcolor   
 * 类名称：Arrangement   
 * 类描述：   
 * 创建人：Ss-2Uncle
 * 创建时间：2016-7-28 上午10:08:07     
 * @version
 */
public class Arrangement
{
    public static void recursionSub ( LinkedList<String[]> list, int count, String[] array, int ind, int start, int... indexs )
    {
        start++;
        if (start > count - 1)
        {
            return;
        }
        if (start == 0)
        {
            indexs = new int[array.length];
        }
        for ( indexs[start] = 0; indexs[start] < array.length; indexs[start]++ )
        {
            recursionSub (list, count, array, indexs[start] + 1, start, indexs);
            if (start == count - 1)
            {
                String[] temp = new String[count];
                for ( int i = count - 1; i >= 0; i-- )
                {
                    temp[start - i] = array[indexs[start - i]];
                }
                list.add (temp);
            }
        }
    }
 
    public static void main ( String[] args )
    {
    	List<String> fullrs=fullrs();
        List<String> rs=MyCombine.rs();
        List<String> rsx=MyCombine.rsx();
        List<String> rsxx=MyCombine.rsxx();
        List<String> rsxxx=MyCombine.rsxxx();
        
        String f="";
        String s="";
        fullrs.removeAll(rs);
        fullrs.removeAll(rsx);
        fullrs.removeAll(rsxx);
        fullrs.removeAll(rsxxx);
        for (String string : fullrs) {
			System.out.println(string);
			
		}
        
        //System.out.println (list.size ());
    }
    public static List<String> fullrs ()
    {
        String[] datas = new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
        LinkedList<String[]> list = new LinkedList<String[]> ();
        recursionSub (list, 4, datas, 0, -1);
        List<String> fullrs=new ArrayList<String>();
        for ( String[] strings : list )
        {
          
            String ts=Arrays.toString (strings).replaceAll ("[\\[\\]\\,\\s]", "");
            fullrs.add(ts);

        }
        return fullrs;
    }
    
}